/**
 * 表格的操作按钮
 */
import React, {Component} from 'react';
import {connect} from 'dva';
import MyIcon from './MyIcon';
import {Tooltip} from 'antd';

const OperatorBtn = ({
                       icon,
                       color,
                       title,
                       onClick
                     }) => {
  return <Tooltip placement="top" title={title}>
      <span style={{marginLeft: 7,marginRight: 7, cursor: 'pointer'}} onClick={onClick}>
              <MyIcon type={icon} style={{color: color, fontSize: 18}}/>
            </span>
    </Tooltip>

};

function mapStateToProps(state) {
  return {};
}
export default connect(mapStateToProps)(OperatorBtn);
